package com.example.xyh.dao;

import com.example.xyh.entity.LineItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ILineItemDao extends JpaRepository<LineItem, Integer> {
    LineItem findByItemId(Integer item_id);

    List<LineItem> findByBusiness_BusinessId(Integer business_id);

    boolean existsByBusiness_BusinessIdAndItemName(Integer business_id, String item_name);

    LineItem save(LineItem lineItem);
}
